package com.xxx.shetuan3.controller;

import com.xxx.shetuan3.common.CommonResult;
import com.xxx.shetuan3.pojo.User;
import com.xxx.shetuan3.service.UserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @ApiOperation("用户注册")
    @PostMapping("/student/regist")
    public CommonResult rigist(User user){
        userService.regist(user);
        return CommonResult.success("注册成功");
    }

}
